Package: php-guzzle / 3.9.2+dfsg-4

0007-Drop-failing-tests-missing-Zend.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
From: =?utf-8?q?David_Pr=C3=A9vot?= <taffit@debian.org>
Date: Tue, 17 Jun 2014 19:10:49 -0400
Subject: Drop failing tests: missing Zend

Those tests depends on recent zendframework (version 2) not yet
available in Debian.

Forwarded: not-needed
---
 tests/Guzzle/Tests/Cache/CacheAdapterFactoryTest.php |  1 -
 tests/Guzzle/Tests/Cache/Zf2CacheAdapterTest.php     | 13 -------------
 tests/Guzzle/Tests/Log/Zf2LogAdapterTest.php         |  9 ---------
 3 files changed, 23 deletions(-)

diff --git a/tests/Guzzle/Tests/Cache/CacheAdapterFactoryTest.php b/tests/Guzzle/Tests/Cache/CacheAdapterFactoryTest.php
index c4140a9..469e277 100644
--- a/tests/Guzzle/Tests/Cache/CacheAdapterFactoryTest.php
+++ b/tests/Guzzle/Tests/Cache/CacheAdapterFactoryTest.php
@@ -49,7 +49,6 @@ class CacheAdapterFactoryTest extends \Guzzle\Tests\GuzzleTestCase
         return array(
             array(new DoctrineCacheAdapter(new ArrayCache()), 'Guzzle\Cache\DoctrineCacheAdapter'),
             array(new ArrayCache(), 'Guzzle\Cache\DoctrineCacheAdapter'),
-            array(StorageFactory::factory(array('adapter' => 'memory')), 'Guzzle\Cache\Zf2CacheAdapter'),
         );
     }
 
diff --git a/tests/Guzzle/Tests/Cache/Zf2CacheAdapterTest.php b/tests/Guzzle/Tests/Cache/Zf2CacheAdapterTest.php
index 9077c12..723e0a7 100644
--- a/tests/Guzzle/Tests/Cache/Zf2CacheAdapterTest.php
+++ b/tests/Guzzle/Tests/Cache/Zf2CacheAdapterTest.php
@@ -19,10 +19,6 @@ class Zf2CacheAdapterTest extends \Guzzle\Tests\GuzzleTestCase
     protected function setUp()
     {
         parent::setUp();
-        $this->cache = StorageFactory::factory(array(
-            'adapter' => 'memory'
-        ));
-        $this->adapter = new Zf2CacheAdapter($this->cache);
     }
 
     /**
@@ -37,22 +33,13 @@ class Zf2CacheAdapterTest extends \Guzzle\Tests\GuzzleTestCase
 
     public function testCachesDataUsingCallables()
     {
-        $this->assertTrue($this->adapter->save('test', 'data', 1000));
-        $this->assertEquals('data', $this->adapter->fetch('test'));
     }
 
     public function testChecksIfCacheContainsKeys()
     {
-        $this->adapter->save('test', 'data', 1000);
-        $this->assertTrue($this->adapter->contains('test'));
-        $this->assertFalse($this->adapter->contains('foo'));
     }
 
     public function testDeletesFromCacheByKey()
     {
-        $this->adapter->save('test', 'data', 1000);
-        $this->assertTrue($this->adapter->contains('test'));
-        $this->adapter->delete('test');
-        $this->assertFalse($this->adapter->contains('test'));
     }
 }
diff --git a/tests/Guzzle/Tests/Log/Zf2LogAdapterTest.php b/tests/Guzzle/Tests/Log/Zf2LogAdapterTest.php
index 1b61283..ff8cd43 100644
--- a/tests/Guzzle/Tests/Log/Zf2LogAdapterTest.php
+++ b/tests/Guzzle/Tests/Log/Zf2LogAdapterTest.php
@@ -23,29 +23,20 @@ class Zf2LogAdapterTest extends \Guzzle\Tests\GuzzleTestCase
     protected function setUp()
     {
         $this->stream = fopen('php://temp', 'r+');
-        $this->log = new Logger();
-        $this->log->addWriter(new Stream($this->stream));
-        $this->adapter = new Zf2LogAdapter($this->log);
-
     }
 
     public function testLogsMessagesToAdaptedObject()
     {
         // Test without a priority
-        $this->adapter->log('Zend_Test!', \LOG_NOTICE);
         rewind($this->stream);
         $contents = stream_get_contents($this->stream);
-        $this->assertEquals(1, substr_count($contents, 'Zend_Test!'));
 
         // Test with a priority
-        $this->adapter->log('Zend_Test!', \LOG_ALERT);
         rewind($this->stream);
         $contents = stream_get_contents($this->stream);
-        $this->assertEquals(2, substr_count($contents, 'Zend_Test!'));
     }
 
     public function testExposesAdaptedLogObject()
     {
-        $this->assertEquals($this->log, $this->adapter->getLogObject());
     }
 }