traderinteractive /
mongo-queue-php
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
| 1 | <?php |
||
| 2 | namespace TraderInteractiveTest\Mongo; |
||
| 3 | |||
| 4 | use PHPUnit\Framework\TestCase; |
||
| 5 | |||
| 6 | class QueueAwareTraitTest extends TestCase |
||
| 7 | { |
||
| 8 | /** |
||
| 9 | * Verify basic behavior of setQueue(). |
||
| 10 | * |
||
| 11 | * @test |
||
| 12 | * @covers \TraderInteractive\Mongo\QueueAwareTrait |
||
| 13 | * |
||
| 14 | * @return void |
||
| 15 | */ |
||
| 16 | public function setQueue() |
||
| 17 | { |
||
| 18 | $mockQueue = $this->getObjectForTrait('\TraderInteractive\Mongo\QueueAwareTrait'); |
||
| 19 | $this->assertAttributeEquals(null, 'mongoQueue', $mockQueue); |
||
|
0 ignored issues
–
show
|
|||
| 20 | $mongoQueue = $this->getMockBuilder('\\TraderInteractive\\Mongo\\QueueInterface')->getMock(); |
||
| 21 | $mockQueue->setQueue($mongoQueue); |
||
| 22 | $this->assertAttributeEquals($mongoQueue, 'mongoQueue', $mockQueue); |
||
|
0 ignored issues
–
show
The method
assertAttributeEquals() does not seem to exist on object<TraderInteractive...go\QueueAwareTraitTest>.
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. Loading history...
|
|||
| 23 | } |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Verify basic behavior of getQueue(). |
||
| 27 | * |
||
| 28 | * @test |
||
| 29 | * @covers \TraderInteractive\Mongo\QueueAwareTrait |
||
| 30 | * |
||
| 31 | * @return void |
||
| 32 | */ |
||
| 33 | public function getQueue() |
||
| 34 | { |
||
| 35 | $mockQueue = $this->getObjectForTrait('\TraderInteractive\Mongo\QueueAwareTrait'); |
||
| 36 | $mongoQueue = $this->getMockBuilder('\\TraderInteractive\\Mongo\\QueueInterface')->getMock(); |
||
| 37 | $mockQueue->setQueue($mongoQueue); |
||
| 38 | $this->assertEquals($mongoQueue, $mockQueue->getQueue()); |
||
| 39 | } |
||
| 40 | } |
||
| 41 |
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.