public static function doSelectOne(Criteria $criteria)
    {
        $id = $criteria->getValue('id');

        $model = new PropelModel();

        return $model->findPk($id);
    }
Beispiel #2
0
 /**
  * @test
  */
 public function shouldFindModelByCriteria()
 {
     $expectedModelId = 123;
     $expectedFoundModel = new PropelModel();
     $expectedFoundModel->findPk($expectedModelId);
     $storage = new PropelStorage('Payum\\Core\\Tests\\Mocks\\Model\\PropelModel');
     $actualModel = $storage->findBy(array('id' => $expectedModelId));
     $this->assertEquals($expectedFoundModel, $actualModel);
 }