File tree Expand file tree Collapse file tree 1 file changed +3
-13
lines changed
Expand file tree Collapse file tree 1 file changed +3
-13
lines changed Original file line number Diff line number Diff line change 44
55namespace Tests \Feature \WpOrg \Api ;
66
7+ use Composer \Util \HttpDownloader ;
78use Mockery ;
89use TypistTech \WpOrgClosedPlugin \WpOrg \Api \Cache ;
910use TypistTech \WpOrgClosedPlugin \WpOrg \Api \Client ;
4849 it ('returns true if and only if the plugin is closed ' , function (string $ slug , bool $ expected ): void {
4950 $ loop = $ this ->loop ();
5051 $ httpDownloader = $ loop ->getHttpDownloader ();
51-
52- $ cache = Mockery::mock (Cache::class);
53- $ cache ->allows ()
54- ->read ()
55- ->withAnyArgs ()
56- ->andReturnNull ();
57- $ cache ->allows ()
58- ->write ()
59- ->withAnyArgs ();
52+ $ cache = Mockery::spy (Cache::class);
6053
6154 $ client = new Client ($ httpDownloader , $ loop , $ cache );
6255
8073
8174 it ('reads from cache ' , function (string $ slug , bool $ expected ): void {
8275 $ loop = $ this ->loop ();
83-
84- $ httpDownloader = Mockery::mock (
85- $ loop ->getHttpDownloader ()
86- );
76+ $ httpDownloader = Mockery::spy (HttpDownloader::class);
8777
8878 $ cache = Mockery::spy (Cache::class);
8979 $ cache ->expects ()
You can’t perform that action at this time.
0 commit comments