Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thenlabs/pyramidal-tests
A complementary framework for PHPUnit that focuses on simplicity, reusability, and storytelling.
https://github.com/thenlabs/pyramidal-tests
bdd bdd-framework bdd-style bdd-style-testing-framework php phpunit phpunit-extension phpunit-tests testing-framework
Last synced: 3 months ago
JSON representation
A complementary framework for PHPUnit that focuses on simplicity, reusability, and storytelling.
- Host: GitHub
- URL: https://github.com/thenlabs/pyramidal-tests
- Owner: thenlabs
- License: mit
- Fork: true (andaniel05/PyramidalTests)
- Created: 2020-04-16T13:14:33.000Z (over 4 years ago)
- Default Branch: 2.0
- Last Pushed: 2023-03-31T19:46:53.000Z (over 1 year ago)
- Last Synced: 2024-09-06T18:53:28.763Z (4 months ago)
- Topics: bdd, bdd-framework, bdd-style, bdd-style-testing-framework, php, phpunit, phpunit-extension, phpunit-tests, testing-framework
- Language: PHP
- Homepage: https://pyramidal-tests.thenlabs.org
- Size: 830 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
PyramidalTests
### A complementary framework for PHPUnit that focuses on simplicity, reusability, and storytelling.
#### If you like this project gift us a ⭐.
## Documentation.
- [English](https://pyramidal-tests.thenlabs.org/en/docs)
- [Español](https://pyramidal-tests.thenlabs.org/es/docs)## Installation.
$ composer require --dev thenlabs/pyramidal-tests 2.0.x-dev
>This project is still under development.
## Example:
```php
product = new Product();
});test('the product has not name', function () {
$this->assertEmpty($this->product->getName());
});test('not contains categories', function () {
$this->assertCount(0, $this->product->getCategories());
});testCase('adds a category to the product', function () {
setUp(function () {
$this->category = $this->createMock(Category::class);
$this->product->addCategory($this->category);
});test('the product contains the category', function () {
$this->assertContains($this->category, $this->product->getCategories());
});
});
});
```## Executing:
$ ./vendor/bin/pyramidal --testdox
>The `--testdox` argument is optional.
## Result:
PyramidalTests 2.x.x by Andy Daniel Navarro Taño and contributors.
PHPUnit 9.5.x by Sebastian Bergmann and contributors.it is created a product
✔ the product has not name
✔ not contains categoriesadds a category to the product
✔ the product contains the categoryTime: 00:00.009, Memory: 6.00 MB
OK (3 tests, 3 assertions)
## Development.
### Running the tests.
$ composer test