Skip to content

Commit

Permalink
Merge pull request #298 from elliotchance/release/2.0.1
Browse files Browse the repository at this point in the history
Release/2.0.1
  • Loading branch information
elliotchance committed Oct 5, 2015
2 parents 7ca9807 + eb5f670 commit a2b1c5e
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 13 deletions.
3 changes: 1 addition & 2 deletions phpunit.xml
Expand Up @@ -9,8 +9,7 @@
stopOnError="false"
stopOnFailure="false"
stopOnIncomplete="false"
stopOnSkipped="false"
strict="true">
stopOnSkipped="false">
<testsuites>
<testsuite name="All Tests">
<directory>tests</directory>
Expand Down
24 changes: 15 additions & 9 deletions src/Concise/Core/Version.php
Expand Up @@ -54,21 +54,27 @@ public function getConciseVersion()
public function getVersionNameForVersion($version)
{
$names = array(
'Big Bang',
'Dark Matter',
'String Theory',
'Supernova',
'Quantum',
'Antimatter',
'Entropy',
'Multiverse',
1 => array(
'Big Bang',
'Dark Matter',
'String Theory',
'Supernova',
'Quantum',
'Antimatter',
'Entropy',
'Multiverse',
),
2 => array(
'Ultraviolet',
'Photon',
)
);

$version = ltrim($version, 'v');
if (strlen($version) < 3) {
return '';
}

return $names[substr($version, 2, 1)];
return $names[substr($version, 0, 1)][substr($version, 2, 1)];
}
}
4 changes: 2 additions & 2 deletions src/Concise/Mock/MockBuilder.php
Expand Up @@ -489,10 +489,10 @@ public function disableConstructor()

/**
* @throws Exception trying to expose a method on a mock that is not nice.
* @internal param $string ... A list of methods to expose.
* @param string $string,... A list of methods to expose.
* @return $this
*/
public function expose()
public function expose($string)
{
if (!$this->niceMock) {
throw new Exception(
Expand Down
3 changes: 3 additions & 0 deletions tests/Concise/Core/VersionTest.php
Expand Up @@ -66,6 +66,7 @@ public function versionData()
'unknown version is blank' => array('', ''),
'version can be prefixed with v' => array('v1.1', 'Dark Matter'),
'patch version' => array('1.2.3', 'String Theory'),
'semantic version' => array('2.0.0', 'Ultraviolet'),
// Specific versions.
array('1.0', 'Big Bang'),
array('1.1', 'Dark Matter'),
Expand All @@ -75,6 +76,8 @@ public function versionData()
array('1.5', 'Antimatter'),
array('1.6', 'Entropy'),
array('1.7', 'Multiverse'),
array('2.0', 'Ultraviolet'),
array('2.1', 'Photon'),
);
}

Expand Down

0 comments on commit a2b1c5e

Please sign in to comment.