| 1 | <?php |
||
| 6 | class Test extends \PHPUnit\Framework\TestCase |
||
|
|
|||
| 7 | { |
||
| 8 | // public function __construct() |
||
| 9 | // { |
||
| 10 | // $this->renderMock = Mockery::mock(Rendered\Render::class); |
||
| 11 | // } |
||
| 12 | |||
| 13 | // public function testRenderedRender() |
||
| 14 | // { |
||
| 15 | // $render = new Rendered\Render; |
||
| 16 | |||
| 17 | // $render->handle('test_key', 'test_content'); |
||
| 18 | |||
| 19 | // $this->assertArraySubset(['test_key' => 'test_content'], $result); |
||
| 20 | // } |
||
| 21 | |||
| 22 | // public function testCriteria() |
||
| 23 | // { |
||
| 24 | |||
| 25 | |||
| 26 | // $render = new Rendered\Render; |
||
| 27 | // $render = new Rendered\Criteria($render); |
||
| 28 | |||
| 29 | // $this->renderMock->shouldReceive('handle') |
||
| 30 | // ->once() |
||
| 31 | // ->andReturn(['test_key' => 'test_content']); |
||
| 32 | |||
| 33 | // $this->app->instance(Rendered\Render::class, $mock); |
||
| 34 | |||
| 35 | // $result = $render->handle('test_key', 'test_content'); |
||
| 36 | |||
| 37 | // $this->assertArraySubset(['test_key' => 'test_content'], $result); |
||
| 38 | // } |
||
| 39 | } |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.