Skip to content

Instantly share code, notes, and snippets.

@kroatoanweb
Created August 1, 2016 19:47
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
<?php
namespace Tests\AppBundle\Manager;
use AppBundle\Manager\DocumentManager;
class DocumentManagerTest extends \PHPUnit_Framework_TestCase
{
public function testAddDocument()
{
$admin = new DocumentManager();
$document = $this->getMockBuilder("Post")
->setMethods(array('getSlug'))
->getMock();
$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