This repository has been archived by the owner on Jan 21, 2020. It is now read-only.
forked from samsonasik/expressive-composer-installer
-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test for minimal install request
- Loading branch information
1 parent
5dcaed0
commit 2b2b10d
Showing
2 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
/** | ||
* Zend Framework (http://framework.zend.com/) | ||
* | ||
* @see https://github.com/zendframework/zend-expressive-skeleton for the canonical source repository | ||
* @copyright Copyright (c) 2015 Zend Technologies USA Inc. (http://www.zend.com) | ||
* @license https://github.com/zendframework/zend-expressive-skeleton/blob/master/LICENSE.md New BSD License | ||
*/ | ||
|
||
namespace ExpressiveInstallerTest; | ||
|
||
use ExpressiveInstaller\OptionalPackages; | ||
use Prophecy\Argument; | ||
|
||
class RequestMinimalTest extends InstallerTestCase | ||
{ | ||
public function testRequestMinimalInstallIsTrue() | ||
{ | ||
$io = $this->prophesize('Composer\IO\IOInterface'); | ||
$io->ask(Argument::any(), Argument::any())->willReturn('y'); | ||
|
||
$answer = OptionalPackages::requestMinimal($io->reveal()); | ||
$this->assertTrue($answer); | ||
} | ||
|
||
public function testRequestMinimalInstallIsFalse() | ||
{ | ||
$io = $this->prophesize('Composer\IO\IOInterface'); | ||
$io->ask(Argument::any(), Argument::any())->willReturn('n'); | ||
|
||
$answer = OptionalPackages::requestMinimal($io->reveal()); | ||
$this->assertFalse($answer); | ||
} | ||
} |