| @@ 488-500 (lines=13) @@ | ||
| 485 | * @param string $identifier The identifier string, as provided in your fixture file |
|
| 486 | * @return int |
|
| 487 | */ |
|
| 488 | protected function idFromFixture($className, $identifier) |
|
| 489 | { |
|
| 490 | $id = $this->getFixtureFactory()->getId($className, $identifier); |
|
| 491 | ||
| 492 | if (!$id) { |
|
| 493 | user_error(sprintf( |
|
| 494 | "Couldn't find object '%s' (class: %s)", |
|
| 495 | $identifier, |
|
| 496 | $className |
|
| 497 | ), E_USER_ERROR); |
|
| 498 | } |
|
| 499 | ||
| 500 | return $id; |
|
| 501 | } |
|
| 502 | ||
| 503 | /** |
|
| @@ 523-535 (lines=13) @@ | ||
| 520 | * |
|
| 521 | * @return DataObject |
|
| 522 | */ |
|
| 523 | protected function objFromFixture($className, $identifier) |
|
| 524 | { |
|
| 525 | $obj = $this->getFixtureFactory()->get($className, $identifier); |
|
| 526 | ||
| 527 | if (!$obj) { |
|
| 528 | user_error(sprintf( |
|
| 529 | "Couldn't find object '%s' (class: %s)", |
|
| 530 | $identifier, |
|
| 531 | $className |
|
| 532 | ), E_USER_ERROR); |
|
| 533 | } |
|
| 534 | ||
| 535 | return $obj; |
|
| 536 | } |
|
| 537 | ||
| 538 | /** |
|