/**
  * @test
  * @todo: Test with alias
  */
 public function deleteQuotesIdentifierAndDelegatesToConcreteQueryBuilder()
 {
     $this->connection->quoteIdentifier('aTable')->shouldBeCalled()->willReturnArgument(0);
     $this->concreteQueryBuilder->delete(Argument::exact('aTable'), Argument::cetera())->shouldBeCalled()->willReturn($this->subject);
     $this->subject->delete('aTable');
 }
Exemplo n.º 2
0
 /**
  * @test
  */
 public function deletes()
 {
     $file = File::create();
     $this->repo->delete($file)->shouldBeCalled()->willReturn('jippikaijea');
     $ret = $this->filelib->getFileRepository()->delete($file);
     $this->assertEquals('jippikaijea', $ret);
 }
Exemplo n.º 3
0
 /**
  * @test
  */
 public function doFlush()
 {
     $this->type->delete()->shouldBeCalled();
     self::assertTrue($this->cache->flushAll());
     $refClass = new \ReflectionClass($this->cache);
     $typeProp = $refClass->getProperty('type');
     $typeProp->setAccessible(true);
     $typeVal = $typeProp->getValue($this->cache);
     self::assertNull($typeVal);
 }
Exemplo n.º 4
0
 public function testReadAndDelete()
 {
     $path = 'path.txt';
     $output = '__CONTENTS__';
     $this->prophecy->has($path)->willReturn(true);
     $this->prophecy->read($path)->willReturn(['contents' => $output]);
     $this->prophecy->delete($path)->willReturn(true);
     $response = $this->filesystem->readAndDelete($path);
     $this->assertEquals($output, $response);
 }
Exemplo n.º 5
0
 /**
  * @dataProvider permissionProvider
  */
 public function testRemove(Requester $requester, Resource $resource, Permission $permission, $cacheId)
 {
     $this->cache->delete($cacheId)->shouldBeCalled();
     $this->permissionBuffer->remove($permission);
 }
 /**
  */
 public function testDelete()
 {
     $id = 1;
     $this->fertilizerObjectManager->delete($id)->shouldBeCalledTimes(1);
     $this->handler->delete($id);
 }
Exemplo n.º 7
0
 /**
  */
 public function testDelete()
 {
     $id = 1;
     $this->repository->delete($id)->shouldBeCalledTimes(1);
     $this->manager->delete($id);
 }