Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?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
You can’t perform that action at this time.