Commit Graph

43 Commits

Author SHA1 Message Date
David Bomba 17f71c7c98 Add back example integration
PDF testing that HTML Generates\n and stuff
2023-01-23 13:58:01 +11:00
David Bomba 527b81768a Fixes for incomplete tests 2023-01-23 12:23:05 +11:00
Shift 4f7a8f9752
Set return type of base TestCase methods
From the [PHPUnit 8 release notes][1], the `TestCase` methods below now declare a `void` return type:

- `setUpBeforeClass()`
- `setUp()`
- `assertPreConditions()`
- `assertPostConditions()`
- `tearDown()`
- `tearDownAfterClass()`
- `onNotSuccessfulTest()`

[1]: https://phpunit.de/announcements/phpunit-8.html
2022-06-21 10:00:57 +00:00
Shift 19080933b6
Apply Laravel coding style
Shift automatically applies the Laravel coding style - which uses the PSR-2 coding style as a base with some minor additions.

You may customize the code style applied by adding a [PHP CS Fixer][1] or [PHP CodeSniffer][2] ruleset to your project root. Feel free to use [Shift's Laravel ruleset][3] to help you get started.

For more information on customizing the code style applied by Shift, [watch this short video][4].

[1]: https://github.com/FriendsOfPHP/PHP-CS-Fixer
[2]: https://github.com/squizlabs/PHP_CodeSniffer
[3]: https://gist.github.com/laravel-shift/cab527923ed2a109dda047b97d53c200
[4]: https://laravelshift.com/videos/shift-code-style
2022-06-21 09:57:17 +00:00
David Bomba 934610a01c Update copyright + version bump + set canadian dollar symbol to $ 2021-01-04 08:54:54 +11:00
= 7a058c9ae6 Move logging to nlog 2020-12-30 08:10:03 +11:00
Benjamin Beganović ae88d5e08e php-cs-fixer format 2020-11-25 15:19:52 +01:00
David Bomba f6435ab030 Working on emails 2020-10-27 22:57:12 +11:00
David Bomba bae82b56c1 Add license 2020-09-14 21:11:46 +10:00
David Bomba ba75a44eb8
Laravel 7.x Shift (#40)
* Adopt Laravel coding style

The Laravel framework adopts the PSR-2 coding style with some additions.
Laravel apps *should* adopt this coding style as well.

However, Shift allows you to customize the adopted coding style by
adding your own [PHP CS Fixer][1] `.php_cs` config to your project.

You may use [Shift's .php_cs][2] file as a base.

[1]: https://github.com/FriendsOfPHP/PHP-CS-Fixer
[2]: https://gist.github.com/laravel-shift/cab527923ed2a109dda047b97d53c200

* Shift bindings

PHP 5.5.9+ adds the new static `class` property which provides the fully qualified class name. This is preferred over using class name strings as these references are checked by the parser.

* Shift core files

* Shift to Throwable

* Add laravel/ui dependency

* Unindent vendor mail templates

* Shift config files

* Default config files

In an effort to make upgrading the constantly changing config files
easier, Shift defaulted them so you can review the commit diff for
changes. Moving forward, you should use ENV variables or create a
separate config file to allow the core config files to remain
automatically upgradeable.

* Shift Laravel dependencies

* Shift cleanup

* Upgrade to Laravel 7

Co-authored-by: Laravel Shift <shift@laravelshift.com>
2020-09-06 19:38:10 +10:00
Benjamin Beganović 1a66f1835f Merge remote-tracking branch 'upstream/v2' into v2-pdfmaker-design-improvements 2020-09-04 13:20:39 +02:00
Benjamin Beganović 219666f765 Generating PDFs using new templates 2020-09-04 13:17:30 +02:00
Benjamin Beganović 50c37a8719 Update logic to support only one dynamic design class:
- New Design.php class that will act as master template
- PdfMaker->design() now accepts design object instead of string
- PdfMaker: Skip elements if no id|tag provided
- PdfMaker: 'content' property is now optional
- config/ninja.php now contains base_path for templates
- Refactored tests to be :green: ✔
- Removed PdfMakerDesignsTest since content is same for each template now
2020-09-04 10:18:41 +02:00
David Bomba 6c8e106959 cleaning up logging in tests 2020-09-03 21:01:04 +10:00
Benjamin Beganović 13e70e24d5 wip 2020-08-21 16:47:17 +02:00
Benjamin Beganović 23577a5f0f Refactor context['product-table-columns'] to generic pdf_variables:
- Pass 'pdf_variables' to CreateQuotePdf & CreateInvoicPdf
- Update Playful & Plain to support new variable engine
- Update DesignHelpers trait to support new variable engine
- Make tests pass for ExampleIntegrationTest
2020-08-21 11:59:39 +02:00
Benjamin Beganović 8a23ed35ea Fixes for global tests 2020-08-10 18:40:04 +02:00
Benjamin Beganović f7408e1fb3 Added new labels & update designs 2020-08-07 17:47:17 +02:00
Benjamin Beganović 8381d37431 Update entity type:
- Default entity type is 'product'
- Added type check
- Fixed double slash in design path
2020-08-07 16:11:10 +02:00
Benjamin Beganović 007ec3a85a Plain:
- Extract table footer into tableFooter()
- Add all footer elements
2020-08-07 14:30:56 +02:00
Benjamin Beganović 00fcb1dd32 Modern:
- Extract table footer into tableFooter()
- Add all footer elements
2020-08-07 14:28:36 +02:00
Benjamin Beganović 80b6512df4 Hipster:
- Extract table footer into tableFooter()
- Add all footer elements
2020-08-07 14:25:43 +02:00
Benjamin Beganović fe1cef3d62 Elegant:
- Extract table footer into tableFooter()
- Add all footer elements
2020-08-07 14:22:18 +02:00
Benjamin Beganović 6cdcf0d914 Creative:
- Extract table footer into tableFooter()
- Add all footer elements
2020-08-07 14:17:55 +02:00
Benjamin Beganović 9ee8a1658e Clean:
- Extract table footer into tableFooter()
- Add all footer elements
2020-08-07 14:05:40 +02:00
Benjamin Beganović 0597b01847 Business:
- Extract table footer into tableFooter()
- Add all footer elements
2020-08-07 14:03:25 +02:00
Benjamin Beganović da74ecba6e Bold:
- Extract table footer into tableFooter()
- Add all footer elements
2020-08-07 14:00:23 +02:00
Benjamin Beganović b438309736 Playful:
- Extract table footer into tableFooter()
- Add all footer elements
2020-08-07 13:55:02 +02:00
David Bomba c220108168 Add documents as default includes 2020-08-06 13:04:09 +10:00
Benjamin Beganović 6676cab698 Playful 2020-08-05 15:40:57 +02:00
Benjamin Beganović 4f69a874cf Modern design 2020-08-05 15:17:45 +02:00
Benjamin Beganović 7a9c8ca9a0 Hipster design 2020-08-05 15:02:32 +02:00
Benjamin Beganović 66ff55cddf Elegant 2020-08-05 14:43:51 +02:00
Benjamin Beganović b1b42f5919 Creative 2020-08-05 14:34:22 +02:00
Benjamin Beganović 1876b228ed Clean 2020-08-05 14:24:10 +02:00
Benjamin Beganović 2333a78775 Business design 2020-08-05 12:35:38 +02:00
Benjamin Beganović d63678435f Bold design 2020-08-05 12:13:48 +02:00
Benjamin Beganović 438054744e refactor invoice to entity 2020-08-05 11:52:01 +02:00
Benjamin Beganović ad2ff79336 Complete Plain.php 2020-08-04 17:32:28 +02:00
Benjamin Beganović 184f60785f wip with table bodies & footer 2020-07-30 17:47:40 +02:00
Benjamin Beganović 70ee476193 wip 2020-07-30 16:43:57 +02:00
Benjamin Beganović cb4efc8c61 wip 2020-07-29 14:53:58 +02:00
Benjamin Beganović 2e3179d83e Extract variables from the HtmlEngine 2020-07-29 13:37:05 +02:00