Skip to content
This repository was archived by the owner on May 30, 2020. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
"require": {
"php": ">=5.4.0",
"monolog/monolog": "~1.10",
"symfony/event-dispatcher": "~2.5",
"symfony/http-kernel": "~2.5",
"symfony/event-dispatcher": "~2.5|~3.0",
"symfony/http-kernel": "~2.5|~3.0",
"black/common": "~2.0.0",
"cocur/slugify": "~1.0"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace spec\Black\Component\Page\Application\DTO;
namespace spec\Black\Page\Application\DTO;

use PhpSpec\ObjectBehavior;

Expand All @@ -23,7 +23,7 @@ public function let()

public function it_is_initializable()
{
$this->shouldHaveType('Black\Component\Page\Application\DTO\CreateWebPageDTO');
$this->shouldHaveType('Black\Page\Application\DTO\CreateWebPageDTO');
}

public function it_should_return_id()
Expand All @@ -41,16 +41,6 @@ public function it_should_return_name()
$this->getName()->shouldReturn($this->name);
}

public function it_should_return_context()
{
$this->getContext()->shouldReturn("http://schema.org");
}

public function it_should_return_type()
{
$this->getType()->shouldReturn("WebPage");
}

public function it_should_serialize()
{
$this->serialize()->shouldBeString();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace spec\Black\Component\Page\Application\DTO;
namespace spec\Black\Page\Application\DTO;

use Black\Component\Page\Domain\Model\WebPageId;
use Black\Page\Domain\Model\WebPageId;
use PhpSpec\ObjectBehavior;

class CreateWebPageAssemblerSpec extends ObjectBehavior
Expand All @@ -13,8 +13,8 @@ class CreateWebPageAssemblerSpec extends ObjectBehavior

public function let()
{
$this->entityClass = 'Black\Component\Page\Domain\Model\WebPage';
$this->dtoClass = 'Black\Component\Page\Application\DTO\CreateWebPageDTO';
$this->entityClass = 'Black\Page\Domain\Model\WebPage';
$this->dtoClass = 'Black\Page\Application\DTO\CreateWebPageDTO';

$this->beConstructedWith($this->entityClass, $this->dtoClass);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace spec\Black\Component\Page\Application\DTO;
namespace spec\Black\Page\Application\DTO;

use PhpSpec\ObjectBehavior;

Expand All @@ -20,19 +20,19 @@ class WebPageDTOSpec extends ObjectBehavior

public function let()
{
$this->id = 1;
$this->author = 'test';
$this->name = 'test';
$this->id = 1;
$this->author = 'test';
$this->name = 'test';
$this->headline = 'test';
$this->about = 'test';
$this->text = 'test';
$this->about = 'test';
$this->text = 'test';

$this->beConstructedWith($this->id, $this->author, $this->name, $this->headline, $this->about, $this->text);
}

public function it_is_initializable()
{
$this->shouldHaveType('Black\Component\Page\Application\DTO\WebPageDTO');
$this->shouldHaveType('Black\Page\Application\DTO\WebPageDTO');
}

public function it_should_return_id()
Expand Down Expand Up @@ -65,16 +65,6 @@ public function it_should_return_text()
$this->getText()->shouldReturn($this->text);
}

public function it_should_return_context()
{
$this->getContext()->shouldReturn("http://schema.org");
}

public function it_should_return_type()
{
$this->getType()->shouldReturn("WebPage");
}

public function it_should_serialize()
{
$this->serialize()->shouldBeString();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace spec\Black\Component\Page\Application\DTO;
namespace spec\Black\Page\Application\DTO;

use Black\Component\Page\Domain\Model\WebPageId;
use Black\Page\Domain\Model\WebPageId;
use PhpSpec\ObjectBehavior;

class WebPageAssemblerSpec extends ObjectBehavior
Expand All @@ -13,8 +13,8 @@ class WebPageAssemblerSpec extends ObjectBehavior

public function let()
{
$this->entityClass = 'Black\Component\Page\Domain\Model\WebPage';
$this->dtoClass = 'Black\Component\Page\Application\DTO\WebPageDTO';
$this->entityClass = 'Black\Page\Domain\Model\WebPage';
$this->dtoClass = 'Black\Page\Application\DTO\WebPageDTO';

$this->beConstructedWith($this->entityClass, $this->dtoClass);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace spec\Black\Component\Page\Application\DTO;
namespace spec\Black\Page\Application\DTO;

use PhpSpec\ObjectBehavior;

Expand All @@ -16,17 +16,17 @@ class WriteWebPageDTOSpec extends ObjectBehavior

public function let()
{
$this->id = 1;
$this->id = 1;
$this->headline = 'test';
$this->about = 'test';
$this->text = 'test';
$this->about = 'test';
$this->text = 'test';

$this->beConstructedWith($this->id, $this->headline, $this->about, $this->text);
}

public function it_is_initializable()
{
$this->shouldHaveType('Black\Component\Page\Application\DTO\WriteWebPageDTO');
$this->shouldHaveType('Black\Page\Application\DTO\WriteWebPageDTO');
}

public function it_should_return_id()
Expand All @@ -49,16 +49,6 @@ public function it_should_return_text()
$this->getText()->shouldReturn($this->text);
}

public function it_should_return_context()
{
$this->getContext()->shouldReturn("http://schema.org");
}

public function it_should_return_type()
{
$this->getType()->shouldReturn("WebPage");
}

public function it_should_serialize()
{
$this->serialize()->shouldBeString();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace spec\Black\Component\Page\Application\DTO;
namespace spec\Black\Page\Application\DTO;

use Black\Component\Page\Domain\Model\WebPageId;
use Black\Page\Domain\Model\WebPageId;
use PhpSpec\ObjectBehavior;

class WriteWebPageAssemblerSpec extends ObjectBehavior
Expand All @@ -13,8 +13,8 @@ class WriteWebPageAssemblerSpec extends ObjectBehavior

public function let()
{
$this->entityClass = 'Black\Component\Page\Domain\Model\WebPage';
$this->dtoClass = 'Black\Component\Page\Application\DTO\WriteWebPageDTO';
$this->entityClass = 'Black\Page\Domain\Model\WebPage';
$this->dtoClass = 'Black\Page\Application\DTO\WriteWebPageDTO';

$this->beConstructedWith($this->entityClass, $this->dtoClass);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace spec\Black\Component\Page\Application\Specification;
namespace spec\Black\Page\Application\Specification;

use Black\Component\Page\Domain\Model\WebPage;
use Black\Component\Page\Domain\Model\WebPageId;
use Black\Page\Domain\Model\WebPage;
use Black\Page\Domain\Model\WebPageId;
use PhpSpec\ObjectBehavior;

class PageIsPublishedSpecificationSpec extends ObjectBehavior
Expand All @@ -12,13 +12,13 @@ class PageIsPublishedSpecificationSpec extends ObjectBehavior

public function it_is_initializable()
{
$this->shouldHaveType('Black\Component\Page\Application\Specification\PageIsPublishedSpecification');
$this->shouldHaveType('Black\Page\Application\Specification\PageIsPublishedSpecification');
}

public function let()
{
$pageId = new WebPageId('12345');
$page = new WebPage($pageId, 'test', 'test');
$page = new WebPage($pageId, 'test', 'test', 'test');

$this->page = $page;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace spec\Black\Component\Page\Domain\Model;
namespace spec\Black\Page\Domain\Model;

use Black\Component\Page\Domain\Model\WebPageId;
use Black\Page\Domain\Model\WebPageId;
use PhpSpec\ObjectBehavior;

class WebPageIdSpec extends ObjectBehavior
Expand All @@ -14,7 +14,7 @@ public function let()

public function it_is_initializable()
{
$this->shouldHaveType('Black\Component\Page\Domain\Model\WebPageId');
$this->shouldHaveType('Black\Page\Domain\Model\WebPageId');
}

public function it_should_have_a_value()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace spec\Black\Component\Page\Domain\Model;
namespace spec\Black\Page\Domain\Model;

use Black\Component\Page\Domain\Model\WebPage;
use Black\Component\Page\Domain\Model\WebPageId;
use Black\Page\Domain\Model\WebPage;
use Black\Page\Domain\Model\WebPageId;
use PhpSpec\ObjectBehavior;

class WebPageSpec extends ObjectBehavior
Expand Down Expand Up @@ -31,18 +31,19 @@ class WebPageSpec extends ObjectBehavior
public function let()
{
$pageId = new WebPageId('12345');
$page = new WebPage($pageId, 'test', 'test', 'test');
$page = new WebPage($pageId, 'test', 'test', 'test');

$this->webPageId = $page->getWebPageId();
$this->name = $page->getName();
$this->author = $page->getAuthor();
$this->name = $page->getName();
$this->author = $page->getAuthor();
$this->slug = $page->getSlug();

$this->beConstructedWith($this->webPageId, $this->name, $this->author);
$this->beConstructedWith($this->webPageId, $this->name, $this->author, $this->slug);
}

public function it_is_initializable()
{
$this->shouldHaveType('Black\Component\Page\Domain\Model\WebPage');
$this->shouldHaveType('Black\Page\Domain\Model\WebPage');
}

public function it_should_have_a_dateCreated()
Expand All @@ -63,8 +64,8 @@ public function it_should_not_be_published()
public function it_should_be_write()
{
$this->headline = "headline";
$this->about = "about";
$this->text = "text";
$this->about = "about";
$this->text = "text";

$this->write($this->headline, $this->about, $this->text);

Expand All @@ -76,8 +77,8 @@ public function it_should_be_write()
public function it_should_be_edited()
{
$this->headline = "headline 2";
$this->about = "about 2";
$this->text = "text 2";
$this->about = "about 2";
$this->text = "text 2";

$this->write($this->headline, $this->about, $this->text);

Expand Down

This file was deleted.

Loading