Skip to content

Commit

Permalink
Add missing test
Browse files Browse the repository at this point in the history
  • Loading branch information
luca-rath committed Oct 18, 2022
1 parent 0d36daa commit bcb873c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,14 @@

namespace Sulu\Bundle\ContentBundle\Content\Infrastructure\Sulu\Structure;

use Sulu\Component\Content\Compat\RoutableStructureInterface as SuluRoutableStructureInterface;

if (\interface_exists(SuluRoutableStructureInterface::class)) {
if (interface_exists(\Sulu\Component\Content\Compat\RoutableStructureInterface::class)) {
/**
* @deprecated will be removed, as soon as the ArticleBundle rises the minimum requirement of sulu to a version,
* where this interface exists
*
* @internal
*/
interface RoutableStructureInterface extends SuluRoutableStructureInterface
interface RoutableStructureInterface extends \Sulu\Component\Content\Compat\RoutableStructureInterface
{
}
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,20 @@ public function testGetController(): void
);
}

public function testGetCacheLifeTime(): void
{
$structure = $this->prophesize(StructureMetadata::class);

$structure->getCacheLifeTime()->willReturn(['type' => 'type', 'value' => 'value']);

$structure = $this->createStructureBridge(null, $structure->reveal());

$this->assertSame(
['type' => 'type', 'value' => 'value'],
$structure->getCacheLifeTime()
);
}

public function testGetKey(): void
{
$structure = $this->prophesize(StructureMetadata::class);
Expand Down

0 comments on commit bcb873c

Please sign in to comment.