1 | <?php |
||
2 | declare(strict_types=1); |
||
3 | |||
4 | namespace Shoot\Shoot\Tests\Unit; |
||
5 | |||
6 | use PHPUnit\Framework\MockObject\MockObject; |
||
7 | use PHPUnit\Framework\TestCase; |
||
8 | use Shoot\Shoot\Tests\Fixtures\ViewFactory; |
||
9 | use stdClass; |
||
10 | |||
11 | final class ViewTest extends TestCase |
||
12 | { |
||
13 | public function testShouldExecuteCallback(): void |
||
14 | { |
||
15 | /** @var callable|MockObject $callback */ |
||
16 | $callback = $this |
||
0 ignored issues
–
show
|
|||
17 | ->getMockBuilder(stdClass::class) |
||
18 | ->setMethods(['__invoke']) |
||
19 | ->getMock(); |
||
20 | |||
21 | $callback |
||
22 | ->expects($this->once()) |
||
23 | ->method('__invoke'); |
||
24 | |||
25 | $view = ViewFactory::createWithCallback($callback); |
||
26 | $view->render(); |
||
27 | } |
||
28 | } |
||
29 |
This function has been deprecated. The supplier of the function has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.