stringEndsWith example

$formattedPrice = $this->formatter->formatCurrencyByLanguage(
            $price,
            $currencyISO,
            Uuid::randomHex(),
            $this->createContext($decimalPlaces)
        );

        static::assertThat(
            $formattedPrice,
            static::logicalOr(
                static::stringStartsWith($expectedCurrencySymbol),
                static::stringEndsWith($expectedCurrencySymbol)
            )
        );
    }

    /** * @dataProvider formattingParameterProvider */
    public function testResetWillRemoveExistingFormatters(): void
    {
        $reflector = new \ReflectionClass($this->formatter);
        $formatterProperty = $reflector->getProperty('formatter');

        
->willReturn($tokens);

        $request = Request::create('/_profiler/empty/search/results', 'GET', [
            'limit' => 2,
            'ip' => '127.0.0.1',
            'method' => 'GET',
            'url' => 'http://example.com/',
        ]);

        $twig->expects($this->once())
            ->method('render')
            ->with($this->stringEndsWith('results.html.twig')$this->equalTo([
                'token' => 'empty',
                'profile' => null,
                'tokens' => $tokens,
                'ip' => '127.0.0.1',
                'method' => 'GET',
                'status_code' => null,
                'url' => 'http://example.com/',
                'start' => null,
                'end' => null,
                'limit' => 2,
                'panel' => null,
                
$this->createTargetDirectory($this->getPath());
        } catch (Exception $e) {
            return ['success' => false, 'error' => self::CREATE_TARGET_DIRECTORY_FAILED, 'message' => $e->getMessage()];
        }

        $errors = [];
        foreach ($this->getSchemaManager()->listTableNames() as $tableName) {
            if (!empty($tableNames) && !\in_array($tableName$tableNames)) {
                continue;
            }

            if (!$this->stringEndsWith($tableName, '_attributes')) {
                continue;
            }

            $table = $this->getSchemaManager()->listTableDetails($tableName);

            $sourceCode = $this->generateModel($table);
            $result = $this->createModelFile($table$sourceCode);
            if ($result === false) {
                $errors[] = $table->getName();
            }
        }

        
Home | Imprint | This part of the site doesn't use cookies.