Remove calls to deprecated function assertAttributeX
This commit is contained in:
parent
8f87a85c07
commit
d098c11539
|
@ -61,14 +61,14 @@ class GenericEventTest extends TestCase
|
|||
public function testSetArguments()
|
||||
{
|
||||
$result = $this->event->setArguments(['foo' => 'bar']);
|
||||
$this->assertAttributeSame(['foo' => 'bar'], 'arguments', $this->event);
|
||||
$this->assertSame(['foo' => 'bar'], $this->event->getArguments());
|
||||
$this->assertSame($this->event, $result);
|
||||
}
|
||||
|
||||
public function testSetArgument()
|
||||
{
|
||||
$result = $this->event->setArgument('foo2', 'bar2');
|
||||
$this->assertAttributeSame(['name' => 'Event', 'foo2' => 'bar2'], 'arguments', $this->event);
|
||||
$this->assertSame(['name' => 'Event', 'foo2' => 'bar2'], $this->event->getArguments());
|
||||
$this->assertEquals($this->event, $result);
|
||||
}
|
||||
|
||||
|
@ -97,13 +97,13 @@ class GenericEventTest extends TestCase
|
|||
public function testOffsetSet()
|
||||
{
|
||||
$this->event['foo2'] = 'bar2';
|
||||
$this->assertAttributeSame(['name' => 'Event', 'foo2' => 'bar2'], 'arguments', $this->event);
|
||||
$this->assertSame(['name' => 'Event', 'foo2' => 'bar2'], $this->event->getArguments());
|
||||
}
|
||||
|
||||
public function testOffsetUnset()
|
||||
{
|
||||
unset($this->event['name']);
|
||||
$this->assertAttributeSame([], 'arguments', $this->event);
|
||||
$this->assertSame([], $this->event->getArguments());
|
||||
}
|
||||
|
||||
public function testOffsetIsset()
|
||||
|
|
|
@ -324,15 +324,15 @@ class PdoSessionHandlerTest extends TestCase
|
|||
public function testUrlDsn($url, $expectedDsn, $expectedUser = null, $expectedPassword = null)
|
||||
{
|
||||
$storage = new PdoSessionHandler($url);
|
||||
$reflection = new \ReflectionClass(PdoSessionHandler::class);
|
||||
|
||||
$this->assertAttributeEquals($expectedDsn, 'dsn', $storage);
|
||||
|
||||
if (null !== $expectedUser) {
|
||||
$this->assertAttributeEquals($expectedUser, 'username', $storage);
|
||||
}
|
||||
|
||||
if (null !== $expectedPassword) {
|
||||
$this->assertAttributeEquals($expectedPassword, 'password', $storage);
|
||||
foreach (['dsn' => $expectedDsn, 'username' => $expectedUser, 'password' => $expectedPassword] as $property => $expectedValue) {
|
||||
if (!isset($expectedValue)) {
|
||||
continue;
|
||||
}
|
||||
$property = $reflection->getProperty($property);
|
||||
$property->setAccessible(true);
|
||||
$this->assertSame($expectedValue, $property->getValue($storage));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Reference in New Issue