Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Phpunit #298

Merged
merged 1 commit into from
Dec 9, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions snippets/php.snippets
Original file line number Diff line number Diff line change
Expand Up @@ -557,3 +557,44 @@ snippet CSVIterator

snippet is
isset($1{VISUAL})

# phpunit
snippet ase
$this->assertEquals(${1:expected}, ${2:actual});

snippet asne
$this->assertNotEquals(${1:expected}, ${2:actual});

snippet asf
$this->assertFalse(${1:Something});

snippet ast
$this->assertTrue(${1:Something});

snippet asfex
$this->assertFileExists(${1:path/to/file});

snippet asfnex
$this->assertFileNotExists(${1:path/to/file});

snippet ascon
$this->assertContains(${1:Search Value}, ${2:Array or Iterator});

snippet ashk
$this->assertArrayHasKey(${1:key}, ${2:array});

snippet asnhk
this->assertArrayNotHasKey(${1:value}, ${2:array});

snippet ascha
$this->assertClassHasAttribute('${1:Attribute Name}', '${2:ClassName}');

snippet asi
$this->assertInstanceOf(${1:expected}, ${2:actual});

snippet tc
public function test${1:name_of_the_test}()
{
${0:code}
}