Skip to content

Commit

Permalink
Created test for interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
Zemistr committed Mar 18, 2015
1 parent 4c6a382 commit 4bb750f
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions tests/InterfacesTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

class InterfacesTest extends PHPUnit_Framework_TestCase {
public function testILanguage() {
$mock = $this->getMock('l10n\Language\ILanguage');

$this->assertInstanceOf('l10n\Language\ILanguage', $mock);
$this->assertSame(true, method_exists($mock, 'getIso639_1'), 'Method "getIso639_1" must exists');
$this->assertSame(true, method_exists($mock, 'getIso639_2'), 'Method "getIso639_2" must exists');
$this->assertSame(true, method_exists($mock, 'getEnglishName'), 'Method "getEnglishName" must exists');
$this->assertSame(true, method_exists($mock, 'getOriginalName'), 'Method "getOriginalName" must exists');
$this->assertSame(true, method_exists($mock, 'isRtl'), 'Method "isRtl" must exists');
}

public function testIPlural() {
$mock = $this->getMock('l10n\Plural\IPlural');

$this->assertInstanceOf('l10n\Plural\IPlural', $mock);
$this->assertSame(true, method_exists($mock, 'getPlural'), 'Method "getPlural" must exists');
$this->assertSame(true, method_exists($mock, 'getPluralForm'), 'Method "getPluralForm" must exists');
$this->assertSame(true, method_exists($mock, 'getPluralsCount'), 'Method "getPluralsCount" must exists');
}
}

0 comments on commit 4bb750f

Please sign in to comment.