Skip to content

Commit 91b0d43

Browse files
authored
Merge pull request #934 from cakephp/4.next-merge
4.x => 4.next merge and fix tests
2 parents 49eaf3f + d70c222 commit 91b0d43

File tree

3 files changed

+10
-18
lines changed

3 files changed

+10
-18
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ permissions:
1313

1414
jobs:
1515
testsuite-linux:
16-
runs-on: ubuntu-20.04
16+
runs-on: ubuntu-22.04
1717
strategy:
1818
fail-fast: false
1919
matrix:
@@ -98,7 +98,7 @@ jobs:
9898

9999
cs-stan:
100100
name: Coding Standard & Static Analysis
101-
runs-on: ubuntu-20.04
101+
runs-on: ubuntu-22.04
102102

103103
steps:
104104
- uses: actions/checkout@v3

docs.Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Generate the HTML output.
2-
FROM markstory/cakephp-docs-builder as builder
2+
FROM ghcr.io/cakephp/docs-builder as builder
33

44
RUN pip install git+https://github.com/sphinx-contrib/video.git@master
55

@@ -15,7 +15,7 @@ RUN cd /data/docs-builder \
1515
&& cp /data/docs/static/* /data/website/html/_static/
1616

1717
# Build a small nginx container with just the static site in it.
18-
FROM markstory/cakephp-docs-builder:runtime as runtime
18+
FROM ghcr.io/cakephp/docs-builder:runtime as runtime
1919

2020
# Configure search index script
2121
ENV LANGS="en fr ja pt"

tests/TestCase/DebugSqlTest.php

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -71,21 +71,13 @@ public function testSqlHtmlOnCli()
7171

7272
ob_start();
7373
$this->assertSame($query, DebugSql::sql($query, true, true));
74-
$result = ob_get_clean();
74+
$result = strip_tags(ob_get_clean());
75+
$result = preg_replace("/[\n\r]/", '', $result);
7576

76-
$expected = <<<EXPECTED
77-
<div class="cake-debug-output">
78-
<span><strong>%s</strong> (line <strong>%d</strong>)</span>
79-
<pre class="cake-debug">
80-
SELECT
81-
panels.id AS %s
82-
FROM
83-
panels panels
84-
</pre>
85-
</div>
86-
EXPECTED;
87-
$expected = sprintf($expected, str_replace(ROOT, '', __FILE__), __LINE__ - 9);
88-
$this->assertTextContains(str_replace("\r", '', $expected), str_replace("\r", '', $result));
77+
$this->assertStringContainsString(sprintf('%s (line %s)', str_replace(ROOT, '', __FILE__), __LINE__ - 4), $result);
78+
$this->assertStringContainsString('SELECT panels.id AS', $result);
79+
$this->assertStringContainsString('panels__id', $result);
80+
$this->assertStringContainsString('FROM panels panels', $result);
8981
}
9082

9183
/**

0 commit comments

Comments
 (0)