Skip to content

Instantly share code, notes, and snippets.

@DavertMik
Last active December 17, 2015 18:29
Show Gist options
  • Save DavertMik/5654009 to your computer and use it in GitHub Desktop.
Save DavertMik/5654009 to your computer and use it in GitHub Desktop.
Isert library concept. More BDD styled assertions for PHPUnit/Codeception.
<?php
I\see($user)->is('User');
I\see($string)->equals('hello');
I\see($user_names)->contains('davert');
I\see("Hello world")->contains('Hello');
I\expect(function() {
$user->save();
})->throwsException('NotAllowedException');
I\expect(function() {
$user->save()
})->toChange($user, 1, 2);
I\see($model->toHtml("This"))
->equals('<p>This</p>');
@Ragazzo
Copy link

Ragazzo commented May 27, 2013

hm, looks like specBDD need to be introduced into Codeception? Really want to do this? ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment