Browse Source

updated some missing references

Johannes Schmitt 14 years ago
parent
commit
4123ec4a1f

+ 1 - 1
src/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php

@@ -64,7 +64,7 @@ class RequestDataCollector extends DataCollector
             'request_cookies'    => $request->cookies->all(),
             'request_attributes' => $attributes,
             'response_headers'   => $responseHeaders,
-            'session_attributes' => $request->hasSession() ? $request->getSession()->getAttributes() : array(),
+            'session_attributes' => $request->hasSession() ? $request->getSession()->all() : array(),
         );
     }
 

+ 6 - 6
tests/Symfony/Tests/Component/HttpFoundation/SessionTest.php

@@ -74,7 +74,7 @@ class SessionTest extends \PHPUnit_Framework_TestCase
         $this->assertFalse($this->session->hasFlash('foo'));
     }
 
-    public function testAttribute()
+    public function testAll()
     {
         $this->assertFalse($this->session->has('foo'));
         $this->assertNull($this->session->get('foo'));
@@ -97,13 +97,13 @@ class SessionTest extends \PHPUnit_Framework_TestCase
 
         $this->session = $this->getSession();
 
-        $this->session->setAttributes($attrs);
+        $this->session->replace($attrs);
 
-        $this->assertSame($attrs, $this->session->getAttributes());
+        $this->assertSame($attrs, $this->session->all());
 
         $this->session->clear();
 
-        $this->assertSame(array(), $this->session->getAttributes());
+        $this->assertSame(array(), $this->session->all());
     }
 
     public function testMigrateAndInvalidate()
@@ -122,7 +122,7 @@ class SessionTest extends \PHPUnit_Framework_TestCase
         $this->session = $this->getSession();
         $this->session->invalidate();
 
-        $this->assertSame(array(), $this->session->getAttributes());
+        $this->assertSame(array(), $this->session->all());
         $this->assertSame(array(), $this->session->getFlashes());
     }
 
@@ -198,7 +198,7 @@ class SessionTest extends \PHPUnit_Framework_TestCase
         $this->assertSame('en', \Locale::getDefault());
 
         $this->assertSame(array(), $this->session->getFlashes());
-        $this->assertSame(array(), $this->session->getAttributes());
+        $this->assertSame(array(), $this->session->all());
     }
 
     public function testStorageRegenerate()