Skip to content

Commit

Permalink
Test has() method
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivar van der Burg committed Apr 7, 2015
1 parent f2aa72f commit 3aa2d27
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/Versioner/CombineReadersTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,25 @@ public function testFileFirstWithCombine()
)
);
}

public function testHasAVersion()
{
$versioner = new Versioner;

// This one should have a version
$versioner->setReaders(
array(new FileReader('VERSION'))
);
return $this->assertTrue(
$versioner->has(__DIR__ . '/../projects/composer-file/')
);

// Should not have a version
$versioner->setReaders(
array(new FileReader('FOO'))
);
return $this->assertFalse(
$versioner->has(__DIR__ . '/../projects/composer-file/')
);
}
}

0 comments on commit 3aa2d27

Please sign in to comment.