/** * @covers Pachico\Abtest\Config\Configuration::__construct * @covers Pachico\Abtest\Config\Configuration::addTest * @covers Pachico\Abtest\Config\Configuration::getTests */ public function testAddTest() { $test1 = new Test\Test('foo', new Split\ArrayProbability([50, 50]), new Memory\Cookie('foo')); $this->assertInstanceOf('Pachico\\Abtest\\Config\\Configuration', $this->object->addTest($test1)); $this->assertArrayHasKey('foo', $this->object->getTests()); $this->assertCount(1, $this->object->getTests()); $test2 = new Test\Test('bar', new Split\ArrayProbability([50, 50]), new Memory\Cookie('foo')); $this->assertInstanceOf('Pachico\\Abtest\\Config\\Configuration', $this->object->addTest($test2)); $this->assertArrayHasKey('bar', $this->object->getTests()); $this->assertCount(2, $this->object->getTests()); }
/** * * @return Tracking\TrackingInterface */ public function track() { return $this->_configuration->getTracking()->track($this->_configuration->getTests()); }