Skip to content

Commit

Permalink
Basic component validation unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
chevli committed Jun 9, 2017
1 parent e5261af commit 4634569
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
1 change: 0 additions & 1 deletion Test/Unit/Component/ComponentAbstractTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ public function testItExtendsAbstract()
$this->assertInstanceOf(ComponentAbstract::class, $this->component);
}


public function testItHasAnAlias()
{
$this->assertClassHasAttribute('alias', $this->className);
Expand Down
24 changes: 24 additions & 0 deletions Test/Unit/Component/RewritesTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php
namespace CtiDigital\Configurator\Test\Unit\Component;

use CtiDigital\Configurator\Model\Component\Rewrites;
use Magento\UrlRewrite\Model\UrlPersistInterface;
use Magento\UrlRewrite\Model\UrlRewriteFactory;

class RewritesTest extends ComponentAbstractTestCase
{
protected function componentSetUp()
{
$urlPersistInterface = $this->getMock(UrlPersistInterface::class);
$urlRewriteFactory = $this->getMock(UrlRewriteFactory::class);

$this->component = new Rewrites(
$this->logInterface,
$this->objectManager,
$urlPersistInterface,
$urlRewriteFactory
);

$this->className = Rewrites::class;
}
}

0 comments on commit 4634569

Please sign in to comment.