This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Tests\AppBundle\Manager; | |
use AppBundle\Manager\DocumentManager; | |
use AppBundle\Document\Post; | |
class DocumentManagerTest extends \PHPUnit_Framework_TestCase | |
{ | |
public function testAddDocument() | |
{ | |
$admin = new DocumentManager(); | |
$document = $this->getMock(Post::class); | |
$document->expects($this->once()) | |
->method('getSlug') | |
->will($this->returnValue('post-slug')); | |
$this->assertTrue($admin->addDocument($document), 'El documento no se ha podido agregar'); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment