Ejemplo n.º 1
0
 public function testFindWithParameter()
 {
     $testEntity = SessionTest::createTestSession();
     self::$entityManager->persist($testEntity);
     self::$entityManager->flush();
     $entity = SessionService::find($testEntity->getId());
     $this->assertEquals($testEntity->toArray(), $entity->toArray());
 }
Ejemplo n.º 2
0
 /**
  * Destroy Session - remove data from resource for given session ID
  *
  * @param string $id Session ID
  * @return bool
  */
 public function destroy($id)
 {
     if (null !== ($session = SessionService::find($id))) {
         SessionService::delete($session);
         return true;
     }
     return false;
 }