1 | <?php |
||
25 | abstract class AbstractManagerTestCase extends AbstractTestCase |
||
26 | { |
||
27 | public function testServiceIsValid() |
||
28 | { |
||
29 | $manager = $this->get(); |
||
30 | $this->assertInstanceOf($this->getManagerInterfaceName(), $manager); |
||
31 | } |
||
32 | |||
33 | public function testReturnsValidRepository() |
||
34 | { |
||
35 | $manager = $this->get(); |
||
36 | $this->assertInstanceOf($this->getRepositoryInterfaceClass(), $manager->getRepository()); |
||
37 | } |
||
38 | |||
39 | public function testReturnsValidEntityAfterInitialization() |
||
40 | { |
||
41 | $manager = $this->get(); |
||
42 | $resource = $manager->initResource(); |
||
43 | $this->assertInstanceOf($this->getExpectedEntityInterface(), $resource); |
||
44 | } |
||
45 | |||
46 | protected function getManagerInterfaceName(): string |
||
50 | |||
51 | protected function getRepositoryInterfaceClass(): string |
||
55 | |||
56 | protected function getFactoryInterfaceClass(): string |
||
60 | |||
61 | abstract protected function get(): ManagerInterface; |
||
62 | |||
63 | abstract protected function getExpectedEntityInterface(): string; |
||
64 | } |
||
65 |