diff options
author | Matthieu Aubry <matt@piwik.org> | 2015-03-12 06:50:01 +0300 |
---|---|---|
committer | Matthieu Aubry <matt@piwik.org> | 2015-03-12 06:50:01 +0300 |
commit | ceff420236aa5d009d6f86dd6a676277eb13572b (patch) | |
tree | 9a38558eda81790647c1a9f26b8dd030c6db611e /tests | |
parent | 1b8320facfdf0c72990a96cadeba28c84eea65e5 (diff) | |
parent | 06f3a4f8cbc0aaf0fb33269ba65947ff2e819d28 (diff) |
Merge pull request #7365 from piwik/no-data-welcome
Show the JS tracking code instead of the dashboard while no visit is tracked
Diffstat (limited to 'tests')
-rw-r--r-- | tests/PHPUnit/Integration/Tracker/ModelTest.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/PHPUnit/Integration/Tracker/ModelTest.php b/tests/PHPUnit/Integration/Tracker/ModelTest.php index def08a3316..2490c8a072 100644 --- a/tests/PHPUnit/Integration/Tracker/ModelTest.php +++ b/tests/PHPUnit/Integration/Tracker/ModelTest.php @@ -9,6 +9,7 @@ namespace Piwik\Tests\Integration\Tracker; use Piwik\Common; use Piwik\Db; +use Piwik\Tests\Fixtures\OneVisitorTwoVisits; use Piwik\Tests\Framework\TestCase\IntegrationTestCase; use Piwik\Tracker\Model; @@ -111,6 +112,16 @@ class ModelTest extends IntegrationTestCase $this->assertEquals($expectedResult, $result); } + public function test_isSiteEmpty() + { + $this->assertTrue($this->model->isSiteEmpty(1)); + + $fixture = new OneVisitorTwoVisits(); + $fixture->setUp(); + + $this->assertFalse($this->model->isSiteEmpty(1)); + } + private function assertLogActionTableContainsTestAction($idaction) { $expectedRows = array( |