Base
2 years ago
ConsumerStrategies
2 years ago
Producers
2 years ago
MixpanelTest.php
2 years ago
index.php
2 years ago
MixpanelTest.php
21 lines
| 1 | <?php |
| 2 | if (!defined('ABSPATH')) exit; |
| 3 | class MixpanelTest extends PHPUnit_Framework_TestCase { |
| 4 | protected $_instance = null; |
| 5 | protected function setUp() { |
| 6 | parent::setUp(); |
| 7 | $this->_instance = Mixpanel::getInstance("token"); |
| 8 | } |
| 9 | protected function tearDown() { |
| 10 | parent::tearDown(); |
| 11 | $this->_instance->reset(); |
| 12 | $this->_instance = null; |
| 13 | } |
| 14 | public function testGetInstance() { |
| 15 | $instance = Mixpanel::getInstance("token"); |
| 16 | $this->assertInstanceOf("Mixpanel", $instance); |
| 17 | $this->assertEquals($this->_instance, $instance); |
| 18 | $this->assertInstanceOf("Producers_MixpanelPeople", $this->_instance->people); |
| 19 | } |
| 20 | } |
| 21 |