Files
sitemap-plugin/spec/Model/AlternativeUrlSpec.php
Joachim Løvgaard 673fcd6b5b Refactoring models (#87)
* Refactoring models:
- Renaming (also of associated factories)
- Added constructors
- Added UrlAlternative model together with a factory
-adding upgrade info regarding models
2019-07-01 15:46:13 +02:00

34 lines
749 B
PHP

<?php
declare(strict_types=1);
namespace spec\SitemapPlugin\Model;
use PhpSpec\ObjectBehavior;
use SitemapPlugin\Model\AlternativeUrl;
use SitemapPlugin\Model\AlternativeUrlInterface;
final class AlternativeUrlSpec extends ObjectBehavior
{
function let(): void
{
$this->beConstructedWith('location', 'locale');
}
function it_is_initializable(): void
{
$this->shouldHaveType(AlternativeUrl::class);
}
function it_implements_alternative_url_interface(): void
{
$this->shouldImplement(AlternativeUrlInterface::class);
}
function it_has_properties_set(): void
{
$this->getLocation()->shouldReturn('location');
$this->getLocale()->shouldReturn('locale');
}
}