| | 411 | public function contains($exp1, $exp2, $message = '') |
|---|
| | 412 | { |
|---|
| | 413 | $exp1 = LimeTester::create($exp1); |
|---|
| | 414 | $exp2 = LimeTester::create($exp2); |
|---|
| | 415 | |
|---|
| | 416 | try |
|---|
| | 417 | { |
|---|
| | 418 | $exp1->assertContains($exp2); |
|---|
| | 419 | |
|---|
| | 420 | return $this->pass($message); |
|---|
| | 421 | } |
|---|
| | 422 | catch (LimeNotEqualException $e) |
|---|
| | 423 | { |
|---|
| | 424 | $error = sprintf("%s\n doesn't contain\n%s", $e->getActual(), $e->getExpected()); |
|---|
| | 425 | |
|---|
| | 426 | return $this->fail($message, $error); |
|---|
| | 427 | } |
|---|
| | 428 | } |
|---|
| | 429 | |
|---|
| | 430 | public function containsNot($exp1, $exp2, $message = '') |
|---|
| | 431 | { |
|---|
| | 432 | $exp1 = LimeTester::create($exp1); |
|---|
| | 433 | $exp2 = LimeTester::create($exp2); |
|---|
| | 434 | |
|---|
| | 435 | try |
|---|
| | 436 | { |
|---|
| | 437 | $exp1->assertNotContains($exp2); |
|---|
| | 438 | |
|---|
| | 439 | return $this->pass($message); |
|---|
| | 440 | } |
|---|
| | 441 | catch (LimeNotEqualException $e) |
|---|
| | 442 | { |
|---|
| | 443 | $error = sprintf("%s\n must not contain\n%s", $e->getActual(), $e->getExpected()); |
|---|
| | 444 | |
|---|
| | 445 | return $this->fail($message, $error); |
|---|
| | 446 | } |
|---|
| | 447 | } |
|---|
| | 448 | |
|---|