Completed
Push — master ( 326ddf...4718f5 )
by Ruud
308:22 queued 297:25
created

Tests/unit/Entity/Rule/OnExitIntentRuleTest.php (1 issue)

Upgrade to new PHP Analysis Engine

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\LeadGenerationBundle\Tests\Entity\Rule;
4
5
use Kunstmaan\LeadGenerationBundle\Entity\Rule\OnExitIntentRule;
6
use Kunstmaan\LeadGenerationBundle\Form\Rule\OnExitIntentAdminType;
7
use PHPUnit\Framework\TestCase;
8
9
class OnExitIntentRuleTest extends TestCase
10
{
11
    public function testGettersAndSetters()
12
    {
13
        $rule = new OnExitIntentRule();
14
        $rule->setDelay(13);
15
        $rule->setSensitivity(2);
16
        $rule->setTimer(3);
17
18
        $this->assertEquals(13, $rule->getDelay());
19
        $this->assertEquals(2, $rule->getSensitivity());
20
        $this->assertEquals(3, $rule->getTimer());
21
        $this->assertEquals('OnExitIntentRule', $rule->getJsObjectClass());
22
        $this->assertEquals('/bundles/kunstmaanleadgeneration/js/rule/OnExitIntentRule.js', $rule->getJsFilePath());
23
        $this->assertEquals(OnExitIntentRule::class, $rule->getFullClassname());
24
        $this->assertEquals('OnExitIntentRule', $rule->getClassname());
25
        $this->assertEquals(OnExitIntentAdminType::class, $rule->getAdminType());
26
        $this->assertInternalType('array', $rule->getJsProperties());
0 ignored issues
show
Deprecated Code introduced by
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...
27
        $this->assertNull($rule->getService());
28
        $this->assertNull($rule->getId());
29
    }
30
}
31