These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | namespace Kunstmaan\ConfigBundle\Tests\Entity; |
||
4 | |||
5 | use DateTime; |
||
6 | use Kunstmaan\DashboardBundle\Entity\AnalyticsConfig; |
||
7 | use PHPUnit\Framework\TestCase; |
||
8 | |||
9 | class AnalyticsConfigTest extends TestCase |
||
10 | { |
||
11 | public function testGettersAndSetters() |
||
12 | { |
||
13 | $entity = new AnalyticsConfig(); |
||
14 | $entity->setId(666); |
||
15 | $entity->setOverviews([]); |
||
16 | $entity->setSegments([]); |
||
17 | $entity->setName('Donald Trump'); |
||
18 | $entity->setToken('blahblah'); |
||
19 | $entity->setPropertyId('blahblah2'); |
||
20 | $entity->setAccountId('blahblah3'); |
||
21 | $entity->setProfileId('blahblah4'); |
||
22 | $entity->setLastUpdate(new DateTime()); |
||
23 | $entity->setDisableGoals(true); |
||
24 | |||
25 | $this->assertEquals(666, $entity->getId()); |
||
26 | $this->assertInternalType('array', $entity->getOverviews()); |
||
0 ignored issues
–
show
|
|||
27 | $this->assertInternalType('array', $entity->getSegments()); |
||
0 ignored issues
–
show
The method
PHPUnit\Framework\Assert::assertInternalType() has been deprecated with message: https://github.com/sebastianbergmann/phpunit/issues/3369
This method has been deprecated. The supplier of the class has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.
Loading history...
|
|||
28 | $this->assertEquals('Donald Trump', $entity->getName()); |
||
29 | $this->assertEquals('blahblah', $entity->getToken()); |
||
30 | $this->assertEquals('blahblah2', $entity->getPropertyId()); |
||
31 | $this->assertEquals('blahblah3', $entity->getAccountId()); |
||
32 | $this->assertEquals('blahblah4', $entity->getProfileId()); |
||
33 | $this->assertInstanceOf(DateTime::class, $entity->getLastUpdate()); |
||
34 | $this->assertTrue($entity->getDisableGoals()); |
||
35 | } |
||
36 | } |
||
37 |
This method has been deprecated. The supplier of the class has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.