public function testBlockedSource() { $executor = new SourceProcessExecutor($this->manager, $this->processor, new NullLogger()); $source = new SourceMock(12345); $source->setBlocked(true); $this->manager->expects($this->once())->method('findById')->will($this->returnValue($source)); $this->processor->expects($this->never())->method('link')->will($this->returnValue(true)); $this->processor->expects($this->once())->method('unlink')->will($this->returnValue(true)); $this->assertFalse($executor->execute([$executor->getObjectPayload($source)])); }
/** * @expectedException \FM\IoBundle\Exception\SourceProcessException * @expectedExceptionMessage Source is blocked */ public function testProcessOnBlockedSource() { $source = new SourceMock(1234); $source->setBlocked(true); $this->delegate->process($source); }