Source of file SyncQueueTest.php
Size: 0,689 Bytes - Last Modified: 2021-12-23T10:38:27+00:00
/var/www/docs.ssmods.com/process/src/tests/SyncQueueTest.php
12345678910111213141516171819202122232425 | <?php namespace StudioBonito\SilverStripe\Queue\Tests; use Mockery as m; class SyncQueueTest extends \PHPUnit_Framework_TestCase { public function tearDown() { m::close(); } public function testPushShouldRunJobInstantly() { $sync = $this->getMock('StudioBonito\SilverStripe\Queue\SyncQueue', array('resolveJob')); $job = m::mock('StdClass'); $sync->expects($this->once())->method('resolveJob')->with( $this->equalTo('Foo'), $this->equalTo('{"foo":"foobar"}') )->will($this->returnValue($job)); $job->shouldReceive('run')->once(); $sync->push('Foo', array('foo' => 'foobar')); } } |