vendor/bshaffer/oauth2-server-bundle/OAuth2/ServerBundle/Tests/Manager/ScopeManagerTest.php
(开头部分) 788B这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
namespace OAuth2\ServerBundle\Tests\Entity;
use OAuth2\ServerBundle\Manager\ScopeManager;
use OAuth2\ServerBundle\Tests\ContainerLoader;
class ScopeManagerTest extends \PHPUnit_Framework_TestCase
{
public function testFindScopesByScopes()
{
$container = ContainerLoader::buildTestContainer();
$em = $container->get('doctrine.orm.entity_manager');
$manager = new ScopeManager($em);
$scopes = array('test-scope-'.rand(), 'test-scope-'.rand(), 'test-scope-'.rand());
foreach ($scopes as $scope) {
$manager->createScope($scope, $scope);
}
$dbScopes = $manager->findScopesByScopes($scopes);
$this->assertNotNull($dbScopes);
$this->assertEquals(count($dbScopes), count($scopes));
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。