예제 #1
0
    public function testResolverBlockRegex()
    {
        $sql = <<<SQL
/** resolver
{
    "depends": [
        "functions",
        "temporal"
    ]
}
*/

/** check the regex is ungreedy */
*/
SQL;
        $db = $this->connectionFactory->get('RW');
        $resolver = new Sql('id', $db, $sql);
        $depends = $resolver->getSqlDepends();
        $this->assertSame($depends, ["functions", "temporal"]);
    }
예제 #2
0
 public function __construct(Sql $resolver, $resolverBlock)
 {
     $this->resolver = $resolver;
     $this->resolverBlock = $resolverBlock;
     $this->message = sprintf("Dependency `%s` has a malformed resolver block.\n --- BEGIN RESOLVER BLOCK ---\n%s\n--- END RESOLVER BLOCK ---\n", $resolver->getId(), $resolverBlock);
 }