rcrowe / TwigBridge

Give the power of Twig to Laravel
MIT License
895 stars 165 forks source link

Add test to ensure that the model exists method can be used #406

Closed mbardelmeijer closed 3 years ago

mbardelmeijer commented 3 years ago

Adds a (failing) test that the Model's exists method can be used in templates.

When #405 is merged, this test will succeed and prevent breakage in the future.

coveralls commented 3 years ago

Coverage Status

Coverage increased (+0.06%) to 59.86% when pulling fbd9ff7f203e040302c08c260d1e1f856e0cc0e5 on mbardelmeijer:test/get-attr-test-exists into a4faebbb0c18cf775fda4247c926faa6319ee611 on rcrowe:master.

coveralls commented 3 years ago

Coverage Status

Coverage remained the same at 59.804% when pulling fbd9ff7f203e040302c08c260d1e1f856e0cc0e5 on mbardelmeijer:test/get-attr-test-exists into a4faebbb0c18cf775fda4247c926faa6319ee611 on rcrowe:master.

mbardelmeijer commented 3 years ago

@barryvdh poke for this and #405 🙈

We're currently running on the #405 branch but prefer to use a tagged version :)

bytestream commented 3 years ago

@mbardelmeijer the additions in this PR are two characters too many 🤦 hah

Would you mind sending another so tests pass?

$ ./vendor/bin/phpcs --standard=PSR2 -p --ignore=./tests/storage/* --report=full --report-checkstyle=build/logs/checkstyle.xml src/ tests/
...............................W............................ 60 / 67 (90%)
.......
FILE: /home/travis/build/rcrowe/TwigBridge/tests/Node/GetAttrTest.php
--------------------------------------------------------------------------------
FOUND 0 ERROR(S) AND 2 WARNING(S) AFFECTING 2 LINE(S)
--------------------------------------------------------------------------------
 50 | WARNING | Line exceeds 120 characters; contains 122 characters
 54 | WARNING | Line exceeds 120 characters; contains 122 characters
--------------------------------------------------------------------------------
UPGRADE TO PHP_CODESNIFFER 2.0 TO FIX ERRORS AUTOMATICALLY
--------------------------------------------------------------------------------

The command "./vendor/bin/phpcs --standard=PSR2 -p --ignore=./tests/storage/* --report=full --report-checkstyle=build/logs/checkstyle.xml src/ tests/" exited with 1.
mbardelmeijer commented 3 years ago

Hehe, what are the chances -- will submit a PR with that fixed.

mbardelmeijer commented 3 years ago

See https://github.com/rcrowe/TwigBridge/pull/408