Skip to content

Commit

Permalink
Add Phpunit
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc Camuzat committed Dec 8, 2013
1 parent c8faad0 commit 4f31132
Showing 1 changed file with 41 additions and 0 deletions.
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}
}

0 comments on commit 4f31132

Please sign in to comment.