Skip to content

[Validator] Add a PSR-6 adapter #17440

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update tests
  • Loading branch information
dunglas committed Jan 26, 2016
commit 1f79d6768e625078d0b1807fcb5a08fbe7f53323
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function write(ClassMetadata $metadata)
}

/**
* Replaces anteslashes by underscores in a class name.
* Replaces backslashes by underscores in a class name.
*
* @param string $class
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ public function testWrite()

$meta->expects($this->once())
->method('getClassName')
->will($this->returnValue('bar'));
->will($this->returnValue('Foo\\Bar'));

$this->cache->write($meta);

$this->assertInstanceOf(
'Symfony\\Component\\Validator\\Mapping\\ClassMetadata',
$this->cache->read('bar'),
$this->cache->read('Foo\\Bar'),
'write() stores metadata'
);
}
Expand All @@ -49,12 +49,12 @@ public function testHas()

$meta->expects($this->once())
->method('getClassName')
->will($this->returnValue('bar'));
->will($this->returnValue('Foo\\Bar'));

$this->assertFalse($this->cache->has('bar'), 'has() returns false when there is no entry');
$this->assertFalse($this->cache->has('Foo\\Bar'), 'has() returns false when there is no entry');

$this->cache->write($meta);
$this->assertTrue($this->cache->has('bar'), 'has() returns true when the is an entry');
$this->assertTrue($this->cache->has('Foo\\Bar'), 'has() returns true when the is an entry');
}

public function testRead()
Expand All @@ -66,15 +66,15 @@ public function testRead()

$meta->expects($this->once())
->method('getClassName')
->will($this->returnValue('bar'));
->will($this->returnValue('Foo\\Bar'));

$this->assertFalse($this->cache->read('bar'), 'read() returns false when there is no entry');
$this->assertFalse($this->cache->read('Foo\\Bar'), 'read() returns false when there is no entry');

$this->cache->write($meta);

$this->assertInstanceOf(
'Symfony\\Component\\Validator\\Mapping\\ClassMetadata',
$this->cache->read('bar'),
$this->cache->read('Foo\\Bar'),
'read() returns metadata'
);
}
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy