/** * @expectedException \Yosymfony\Spress\Core\ContentManager\Exception\AttributeValueException */ public function testPrettyBadDateAttribute() { $pmg = new PermalinkGenerator('pretty'); $permalink = $pmg->getPermalink($this->createItem('index.html', ['date' => []])); }
/** * @expectedException Yosymfony\Spress\Core\ContentManager\Exception\AttributeValueException * @expectedExceptionMessage Invalid value. Expected string in "index.html" at key "permalink". */ public function testBadTypeHintPermalinkAttribute() { $pmg = new PermalinkGenerator('pretty'); $pmg->getPermalink($this->createItem('index.html', ['permalink' => []])); }