Skip to content

Commit

Permalink
Added missing tests for ConfigurableView
Browse files Browse the repository at this point in the history
  • Loading branch information
lolautruche committed Aug 31, 2017
1 parent 3f0037e commit 871e2d1
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Tests/View/ConfigurableViewTest.php
Expand Up @@ -9,7 +9,10 @@

namespace Lolautruche\EzCoreExtraBundle\Tests\View;

use eZ\Publish\Core\MVC\Symfony\View\ContentView;
use eZ\Publish\Core\MVC\Symfony\View\View;
use eZ\Publish\Core\Repository\Values\Content\Content;
use eZ\Publish\Core\Repository\Values\Content\Location;
use Lolautruche\EzCoreExtraBundle\View\ConfigurableView;
use PHPUnit_Framework_TestCase;
use Symfony\Component\HttpFoundation\Response;
Expand Down Expand Up @@ -179,4 +182,22 @@ public function testGetResponse()
->willReturn($response);
$this->assertSame($response, $view->getResponse());
}

public function testGetContent()
{
$content = new Content();
$innerView = new ContentView();
$innerView->setContent($content);
$view = new ConfigurableView($innerView);
$this->assertSame($content, $view->getContent());
}

public function testGetLocation()
{
$location = new Location();
$innerView = new ContentView();
$innerView->setLocation($location);
$view = new ConfigurableView($innerView);
$this->assertSame($location, $view->getLocation());
}
}

0 comments on commit 871e2d1

Please sign in to comment.