inpsyde / monkery-test-case Goto Github PK
View Code? Open in Web Editor NEWComposes all relevant packages for WP components unit testing
License: GNU General Public License v2.0
Composes all relevant packages for WP components unit testing
License: GNU General Public License v2.0
That will also require the removal of the patchwork cache-dir configuration.
Mockery is now available in version 1.0
As far as I can see it Brain/Monkey can use version 1.0 (Brain-WP/BrainMonkey@02bf838)
If possible, can we remove the restriction for version ^0.9.9?
$ composer why mockery/mockery
brain/monkey 2.2.0 requires mockery/mockery (>=0.9 <2)
inpsyde/monkery-test-case 4.0.0 requires mockery/mockery (^0.9.9)
My current problem:
$discontinuedStatus = \Mockery::mock(DocumentStatus::class);
$discontinuedStatus
->shouldReceive('__toString')
->andReturn(DocumentStatus::STATUS_DISCONTINUED);
gives me this error:
PHP Fatal error: Declaration of Mockery_6_Types_DocumentStatus::__toString() must be compatible with \Types\DocumentStatus::__toString(): string
Mockery seems to be able to handle this in 1.0.
Seems isn't possible to create a class that setup both mockery and brain monkey.
Any reason why not use just one class since brain/monkey require mockery too?
Something like
use Brain\Monkey;
use Mockery;
use PHPUnit\Framework\TestCase as PhpUnitTestCase;
/**
* Class Testcase
*/
class TestCase extends PhpUnitTestCase
{
/**
* Sets up the fixture, for example, open a network connection.
* This method is called before a test is executed.
*/
protected function setUp()
{
parent::setUp();
Monkey\setUp();
}
/**
* Tears down the fixture, for example, close a network connection.
* This method is called after a test is executed.
*/
protected function tearDown()
{
parent::tearDown();
Mockery::close();
Monkey\tearDown();
}
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.