/** * @dataProvider supportedMethods * @param string $method * @param boolean $isValid * @param boolean $isProcessed */ public function testProcessSupportedRequest($method, $isValid, $isProcessed) { if ($isValid) { $this->slugManager->expects($this->once())->method('makeUrlUnique')->with($this->entity->getCurrentSlug()); } else { $this->slugManager->expects($this->never())->method('makeUrlUnique')->with($this->entity->getCurrentSlug()); } parent::testProcessSupportedRequest($method, $isValid, $isProcessed); }
/** * @dataProvider supportedMethods * @param string $method * @param boolean $isValid * @param boolean $isProcessed */ public function testProcessSupportedRequest($method, $isValid, $isProcessed) { $reflection = new \ReflectionProperty(get_class($this->entity), 'id'); $reflection->setAccessible(true); $reflection->setValue($this->entity, 1); $this->manager->expects($this->once())->method('refresh')->with($this->entity); parent::testProcessSupportedRequest($method, $isValid, $isProcessed); $this->assertEquals(self::DEFAULT_LOCALE, $this->entity->getLocale()); }