1 | <?php |
||
22 | class ActivityContactRecalculateCommandTest extends WebTestCase |
||
23 | { |
||
24 | public function setUp() |
||
25 | { |
||
26 | $this->initClient(); |
||
27 | $this->loadFixtures([ |
||
28 | 'OroCRM\Bundle\ContactBundle\Tests\Functional\DataFixtures\LoadContactEntitiesData', |
||
29 | ]); |
||
30 | } |
||
31 | |||
32 | public function testRecalculationOfContactedContactHavingNoActivities() |
||
33 | { |
||
34 | $firstContact = $this->findContact(LoadContactEntitiesData::FIRST_ENTITY_NAME); |
||
35 | |||
36 | $firstContact->setAcContactCount(1); |
||
37 | $this->getEntityManager()->flush(); |
||
38 | $this->runActivityContactRecalculateCommand(); |
||
39 | $firstContact = $this->findContact(LoadContactEntitiesData::FIRST_ENTITY_NAME); |
||
40 | |||
41 | $this->assertEquals(0, $firstContact->getAcContactCount()); |
||
42 | } |
||
43 | |||
44 | protected function runActivityContactRecalculateCommand() |
||
45 | { |
||
46 | $app = new Application($this->getContainer()->get('kernel')); |
||
47 | $app->setAutoExit(false); |
||
48 | $app->run(new ArrayInput([ |
||
49 | 'command' => ActivityContactRecalculateCommand::COMMAND_NAME, |
||
50 | ])); |
||
51 | } |
||
52 | |||
53 | /** |
||
54 | * @param string $firstName |
||
55 | * |
||
56 | * @return Contact |
||
57 | */ |
||
58 | protected function findContact($firstName) |
||
62 | |||
63 | /** |
||
64 | * @return EntityManager |
||
65 | */ |
||
66 | protected function getEntityManager() |
||
70 | |||
71 | /** |
||
72 | * @return Registry |
||
73 | */ |
||
74 | protected function getRegistry() |
||
78 | } |
||
79 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.