File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Tooly \Tests \Script \Helper ;
4+
5+ use phpmock \phpunit \PHPMock ;
6+ use Tooly \Script \Helper \Downloader ;
7+
8+ /**
9+ * @package Tooly\Tests\Script\Helper
10+ */
11+ class DownloaderTest extends \PHPUnit_Framework_TestCase
12+ {
13+ use PHPMock;
14+
15+ public function testAccessibleTestWorksCorrect ()
16+ {
17+ $ downloader = new Downloader ;
18+
19+ $ this ->assertFalse ($ downloader ->isAccessible ('foo ' ));
20+ $ this ->assertTrue ($ downloader ->isAccessible ('https://github.com/tommy-muehle/tooly-composer-script/blob/master/README.md ' ));
21+ }
22+
23+ public function testCanDownloadContentFromUrl ()
24+ {
25+ $ downloader = new Downloader ;
26+
27+ $ this ->assertRegExp (
28+ '/tooly-composer-script/ ' ,
29+ $ downloader ->download ('https://github.com/tommy-muehle/tooly-composer-script/blob/master/README.md ' )
30+ );
31+ }
32+ }
You can’t perform that action at this time.
0 commit comments