Download tests/PHPUnit/Fixtures/OneVisitWithSiteSearch.php from Leon4gr45/matomo: direct link, hf CLI and curl.
- Browser
- Download file 1.09 kB
-
https://huggingface.co/spaces/Leon4gr45/matomo/resolve/main/tests/PHPUnit/Fixtures/OneVisitWithSiteSearch.php
- Command line
-
hf download hf://spaces/Leon4gr45/matomo/tests/PHPUnit/Fixtures/OneVisitWithSiteSearch.php
-
curl -L -o OneVisitWithSiteSearch.php https://huggingface.co/spaces/Leon4gr45/matomo/resolve/main/tests/PHPUnit/Fixtures/OneVisitWithSiteSearch.php
1.09 kB
| namespace Piwik\Tests\Fixtures; | |
| use Piwik\Tests\Framework\Fixture; | |
| class OneVisitWithSiteSearch extends Fixture | |
| { | |
| public $dateTime = '2012-01-11 07:22:33'; | |
| public $idSite = 1; | |
| public function setUp(): void | |
| { | |
| $this->setUpWebsitesAndGoals(); | |
| $this->trackVisits(); | |
| } | |
| public function tearDown(): void | |
| { | |
| // empty | |
| } | |
| private function setUpWebsitesAndGoals() | |
| { | |
| if (!self::siteCreated($idSite = 1)) { | |
| self::createWebsite($this->dateTime); | |
| } | |
| } | |
| private function trackVisits() | |
| { | |
| $tracker = self::getTracker($this->idSite, $this->dateTime, true); | |
| $tracker->setTokenAuth(self::getTokenAuth()); | |
| $tracker->setUrl('http://example.org/sites/search.html'); | |
| $tracker->setForceVisitDateTime($this->dateTime); | |
| self::checkResponse( | |
| $tracker->doTrackSiteSearch( | |
| 'title%3A"test"+AND+body%3A"test"+AND+spaceCategory%3AALL+AND+startIndex%3A0+AND+pageSize%3A10', | |
| '', | |
| 3 | |
| ) | |
| ); | |
| } | |
| } | |